package com.atguigu.gulimall.search.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author LiDeJie
 * @Create 2024/1/17 19:48
 * @Version 1.0
 */
@FeignClient(value = "gulimall-product")
public interface ProductFeignService {
    
    /**
     * 信息
     * http://localhost:12000/product/attr/info/{attrId}
     */
    @GetMapping("/product/attr/info/{attrId}")
    R info(@PathVariable("attrId") Long attrId);
    
    /**
     * 根据品牌id集合,获取所有品牌信息
     * /product/brand/brandInfos
     */
    @GetMapping("/product/brand/brandInfos")
    R getBrandIds(@RequestParam List<Long> brandIds) ;
    
    
    /**
     * 信息 
     * /product/category/info/{{catId}}
     */
    @RequestMapping("/product/category/info/{catId}")
    R catalogInfo(@PathVariable("catId") Long catId);
    
}
